#include <stdio.h>

#define N 50

int main() {
    int n, i, a[N] = {1, 1};

    printf("Enter n: ");
    scanf("%d", &n);
    if(n>=N){
        printf("n must be less than %d\n", N);
        return 1;
    }

    for (i = 2; i < n; i++)
        a[i] = a[i - 1] + a[i - 2];

    for (i = 0; i < n; i++)
        printf("%d ", a[i]);

    printf("\n");
    return 0;
}
